package org.xg.study.spring.al.config;

/**
 * @author CMG
 * @version 1.0
 * @description
 * @cLassName RestException
 * @date 2021/10/28 9:51
 **/
public class RestException extends RuntimeException {
    private static final long serialVersionUID = -649224303322031383L;

    private RestCodeEnum retCode;

    public RestException() {
        super();
    }

    public RestException(RestCodeEnum retCode) {
        super(retCode.getMsg());
        this.retCode = retCode;
    }

    public RestException(String message, RestCodeEnum retCode) {
        super(message);
        this.retCode = retCode;
    }

    public RestCodeEnum getRetCode() {
        return retCode;
    }

    public void setRetCode(RestCodeEnum retCode) {
        this.retCode = retCode;
    }
}
